home *** CD-ROM | disk | FTP | other *** search
/ Winzipper / Winzipper_ISO.iso / internet / net commander 1.0 / ISP / SCRPTLST / MCS.CMD < prev    next >
Encoding:
Text File  |  1996-02-12  |  1.4 KB  |  71 lines

  1. #    MCSNet Login.cmd Script for Trumpet Winsock
  2. #
  3. #trace on
  4. # set up some strings for dialing up MCS
  5. if ! [load $number]
  6.   if [query $number "Enter MCS's dialup number"]
  7.     save $number
  8.   end
  9. end
  10. if ! [load $username]
  11.    if [username "Enter you login username"]
  12.     save $username
  13.    end
  14. end
  15. if ! [load $password]
  16.    if [password "Enter your login password"]
  17.      save $password
  18.    end
  19. end
  20. $modemsetup = "&c1&k3"
  21. #replace above with "&f1" if you get a Modem-Not-Responding-Message
  22. $prompt = ">"
  23. $userprompt = "login:"
  24. $passprompt = "Password:"
  25. $slipcmd = "slip"
  26. $addrtarg = "Your address is"
  27. $pppcmd = "ppp"
  28. %attempts = 10
  29. #-------------------------------------------------------------------
  30. # initialize modem
  31. output "atz"\13
  32. if ! [input 10 OK\n]
  33.    display "Modem is not responding"\n
  34.    abort
  35. end
  36. #
  37. # setup our modem commands
  38. #
  39. output "at"$modemsetup\13
  40. input 10 OK\n
  41. #
  42. # send phone number
  43. #
  44. %n = 0
  45. repeat
  46.   if %n = %attempts
  47.     display "Too many dial attempts"\n
  48.     abort
  49.   end
  50.   output "atdt"$number\13
  51.   %ok = [input 60 CONNECT]
  52.   %n = %n + 1
  53.  until %ok
  54.  input 10 \n
  55. #
  56. # wait until it is safe to send because some modem's hang up if you transmit during
  57. # the connection phase
  58. #
  59. wait 30 dcd
  60. #
  61. # now prod the terminal server
  62. #
  63. output \13
  64. #
  65. # and the password
  66. #
  67. input 30 $passprompt
  68. output $password\13
  69.    # jump into slip mode
  70.    #
  71.   output $slipcmd\13